import request from '../utils/request';
import {stringify} from "querystring";


export const listAllProvince = () => {
    return request({
        //列出所有省
        url: '/book/v1/region/listAllProvince',
        method: 'post',
        headers : {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    });
};

export const listAllCity = query => {
    return request({
        //列出所有市
        url: '/book/v1/region/listAllCity',
        method: 'post',
        data:stringify(query),
        headers : {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    });
};

export const listAllDistrict = query => {
    return request({
        //列出所有区
        url: '/book/v1/region/listAllDistrict',
        method: 'post',
        data:stringify(query),
        headers : {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    });
};

export const listAllSection = () => {
    return request({
        //列出所有学段
        url: '/book/v1/section/listAllSection',
        method: 'post',
        headers : {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    });
};

export const listAllSubject = () => {
    return request({
        //列出所有科目
        url: '/book/v1/subject/listAllSubject',
        method: 'post',
        headers : {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    });
};

export const listAllBookGrade = () => {
    return request({
        //列出所有科目
        url: '/book/v1/bookGrade/listAllBookGrade',
        method: 'post',
        headers : {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    });
};

export const listBookByRegion = query => {
    return request({
        //列出所有区
        url: '/book/v1/analysis/listBookByRegion',
        method: 'post',
        data:stringify(query),
        headers : {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    });
};

export const bookDetails = query => {
    return request({
        //列出所有区
        url: '/book/v1/bookDetails/listDetails',
        method: 'post',
        data:query
    });
};

export const queryFileTask = (query,pageNumber,pageSize) => {
    return request({
        //列出所有区
        url: '/book/v1/fileTask/query/'+pageNumber+'/'+pageSize,
        method: 'post',
        data:query
    });
};

export const insertFileTask = query => {
    return request({
        //列出所有区
        url: '/book/v1/fileTask/insert',
        method: 'post',
        data:query
    });
};


export const appFeedBackListAll = (query,pageNumber,pageSize) => {
    return request({
        //列出所有区
        url: '/book/v1/APPFeedback/listAll/'+pageNumber+'/'+pageSize,
        method: 'post',
        data:query
    });
};


